SubDirList(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})

list(REMOVE_ITEM SUBDIRS python)
list(REMOVE_ITEM SUBDIRS TutorialOpenAIAutonomy)
if (NOT ENABLE_PYTHON_BINDINGS)
    list(REMOVE_ITEM SUBDIRS PyAutonomy)
    list(REMOVE_ITEM SUBDIRS ScrimmageOpenAIAutonomy)
    list(REMOVE_ITEM SUBDIRS RLSimple)
    list(REMOVE_ITEM SUBDIRS RLConsensus)
endif()

if (NOT GRPC_FOUND OR EXTERNAL)
    list(REMOVE_ITEM SUBDIRS ExternalControl)
    list(REMOVE_ITEM SUBDIRS TutorialOpenAIAutonomy)
endif()

FOREACH(subdir ${SUBDIRS})
  ADD_SUBDIRECTORY(${subdir})
ENDFOREACH()

set(PROJECT_PLUGINS ${PROJECT_PLUGINS} PARENT_SCOPE)
